﻿using suirui.ZhuMu.Model;
using suirui.ZhuMu.Entity;
using suirui.ZhuMu.Entity.Entities;
using System;
using System.Threading.Tasks;
using suirui.ZhuMu.Repositories;
using System.Collections.Generic;

namespace suirui.ZhuMu.Services
{
    public class LoginService : ILoginService
    {
        private readonly ILoginRepository _LoginRepository;

        public LoginService(ILoginRepository loginRepository)
        {
            this._LoginRepository = loginRepository ?? throw new ArgumentNullException(nameof(loginRepository));
        }

        public Task<APIResult<User>> Login(LoginDTO login)
        {
            return _LoginRepository.Login(login);
        }

    }
}
